package cx3k.dataObjects;


public class Time implements Comparable{
	private int hour;
	private int minute;
	private static enum daytime {AM, PM, MILITARY};
	private daytime day;
	
	Time(){
		this(1, 0, "MIL");
	}
	
	Time(int hour, int minute, String daytime){
		if(hour >= 0 && hour <= 24)
			this.hour = hour;
		if(minute >= 0 && minute <= 60)
			this.minute = minute;
		if(daytime.equalsIgnoreCase("am"))
			this.day = day.AM;
		else if(daytime.equalsIgnoreCase("pm"))
			this.day = day.PM ;
		else
			this.day = day.MILITARY;
	}
	
	Time(Time temp){
		this.hour = temp.hour;
		this.minute = temp.minute;
		this.day = temp.day;
	}
	
	public int compareTo(Object o){
		if(o.getClass() != Time.class.getClass())
			return -1;
		return 0;
	}
	
}
